import axios from 'axios';

// 用户标签列表
let user_tags_list = (params) => axios.get('/user/user_label', { params });

// 用户标签添加/编辑表单
let set_user_label = (id, params) => axios.get(`/user/user_label/add/${id}`, { params });

// 获取用户标签
let obtain_user_tags = (uid, params) => axios.get(`/user/label/${uid}`, { params });

// 获取标签分类（全部）
let label_cate = (params) => axios.get('/user/user_label_cate/all', { params });

// 添加、编辑用户标签
let set_user_tags = (data) => axios.post('/user/user_label/save', data);

// 保存用户标签分类
let save_label_cate = (data) => axios.post('/user/user_label_cate', data);

// 保存和取消用户标签
let set_label = (uid, data) => axios.post(`/user/label/${uid}`, data);

export default {
    obtain_user_tags,
    label_cate,
    user_tags_list,
    set_user_label,
    set_user_tags,
    save_label_cate,
    set_label,
}